import { useContext } from "react";
import { Context } from "./UseContextDemo";
function ContextCom2(){
    let con= useContext(Context);
    return (
        <div style={{width:'400px',height:'100px',background:'yellow'}}>
           子组件2 {con?.counts}
        </div>
    )

}
export default ContextCom2;